home *** CD-ROM | disk | FTP | other *** search
- 4]------------------
- 3]BUG
- 3]By Dennis Saunders
- 4]------------------
-
- BUG is a simple simulation of single-celled animal growth. There are
- two types of bugs, each of which has a behavior pattern determined by you.
- You also control the environment and initial conditions. A bug with a
- successful behavior pattern will grow and multiply. Success depends on the
- environment and competition from other bugs.
- This program is free. I include the source code (unrefined as it is)
- and encourage you to modify it as you wish. (JUMPDISK NOTE: The source is
- crunched on this disk. See item on decrunching to save this file as plain
- text.)
- I would like to hear your comments. Contact me at this address: Dennis
- Saunders, 741 Goldfinch Way, Anaheim, CA 92807. Telephone: (714) 637-1851.
-
- 3]BEHAVIOR OF BUGS
- Basic behavior which cannot be altered is as follows:
- If a wall or a bug of the same type is encountered, the bug will
- turn in a random direction.
- Each cycle, a bug uses one energy unit. If he eats a food particle he
- gains an amount of energy equal to the FOOD VALUE parameter.
- If a bug's energy goes to zero, he dies of starvation. Dead bugs
- become food particles.
- If a bug of the opposite type is encountered, a fight will occur. The
- bug with the greater energy will win and he will eat his opponent, gaining
- the energy of the opponent.
- Bugs live until they starve, are eaten, or exceed the age at death
- parameter.
- If a bug accumulates energy above the MITOSIS NRG parameter, it will
- undergo cell division. Each of the two new cells will inherit half the
- energy of the parent. One of the pair will retain the parent's age, and the
- other will have an age of zero.
-
- 3]MENU SELECTIONS
- The single menu selections are as follow:
-
- GENE: Enter a sequence of four letters to determine the bug's behavior:
- f = forward
- l = turn left
- r = turn right
- ? + turn in a random direction (left, right, forward, reverse).
- Successful bugs will have movement patterns which brings them in
- contact with food.
-
- PARMS: Enter values for initial conditions and values common to both
- types of bugs.
-
- FOOD VALUE: Amount on energy a bug receives when he eats a food
- particle (grey dots on the screen).
- INITIAL ENERGY: All the bugs at the beginning of the simulation are
- given this amount of energy.
- FOOD RATE: This is the number of food particles added to the screen
- after each cycle.
- CYCLES: Number of cycles before ending the simulation. Enter -1 for
- continuous mode.
- INIT FOOD: Number of food particles on the screen at the start of
- the simulation.
- INIT # BUGS: Number of bugs of each type which start the simulation.
- The initial bus have the amount of energy given in INITIAL ENERGY
- but have random age, initial location, initial direction, and index
- into their movement pattern.
- MITOSIS ENERGY: The amount of food energy a bug must accumulate in
- order to undergo cell division.
-
- GO: Begin the simulation.
-
- CONTINUE: You may stop the simulation at any time by clicking the left
- mouse button. The behavior or environment may be altered at this point.
- This selection allows you to restart the simulation.
-
- REPORT: This option tells you how many bugs are on the screen, how many
- births have occurred, how many deaths have occurred due to starvation, old
- age, or by being eaten.
-
- TRAILS: Turn this on to see the movement pattern of a bug type.
-
- QUIT: Serves no useful purpose.
-